/*
 * @Author: youngqj youngqj@126.com
 * @Date: 2024-12-04 19:09:24
 * @LastEditors: youngqj youngqj@126.com
 * @LastEditTime: 2024-12-04 19:09:44
 * @FilePath: /mallSystem/core/utils/base64x.go
 * @Description:
 *
 * Copyright © Zhejiang Xiaoqu Information Technology Co., Ltd, All Rights Reserved.
 */
package utils

import "encoding/base64"

// Base64 编码
func encodeBase64(data string) string {
	return base64.StdEncoding.EncodeToString([]byte(data))
}

// Base64 解码
func decodeBase64(encodedData string) (string, error) {
	decoded, err := base64.StdEncoding.DecodeString(encodedData)
	return string(decoded), err
}
